package jp.bgbt.fles.app.rnmodule;

import android.util.Log;

import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import com.ghondar.vlc.OrientationModule;
import com.ghondar.vlc.VlcPlayerModule;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class CustomPackage implements ReactPackage {

    @Override
    public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
//        return Arrays.<ViewManager>asList(new VlcPlayerModule());
        List<ViewManager> viewManagers = new ArrayList<>();
        viewManagers.add(new VlcPlayerModule());

        return viewManagers;

    }

    @Override
    public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
        List<NativeModule> modules = new ArrayList<>();

        modules.add(new BleModule(reactContext));
        modules.add(new ToastModule(reactContext));
        modules.add(new OrientationModule(reactContext));
        Log.d("CustomPackage length",String.valueOf(modules.size()));
        return modules;
    }
}
